home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7910 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Does Borland C++ 5.0 still work with normal C???
  5. Date: Thu, 29 Feb 96 14:27:30 GMT
  6. Organization: none
  7. Message-ID: <825604050snz@genesis.demon.co.uk>
  8. References: <n4mwd.33.000A228B@magg.net> <4gdkv3$q8a@druid.borland.com> <4ggsie$1fg@dopey.magg.net> <4gqdf7$jfo@redstone.interpath.net> <4gvu67$es7@hacgate2.hac.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4gvu67$es7@hacgate2.hac.com>
  15.            collins@thor.tu.hac.com "Ron Collins" writes:
  16.  
  17. >The expression in question is "sizeof 'a'", which returns the size of
  18. >an expression, not a type.
  19.  
  20. Well it returns the size of the type of the result of the expression. The
  21. size of an object or value is purely a function of its type.
  22.  
  23. > The result type of the expression 'a' is an
  24. >int, not a char.  Therefore, "(sizeof 'a') => 2" is correct.
  25.  
  26. Assuming (as I think is the case here) that sizeof(int) is 2.
  27.  
  28. -- 
  29. -----------------------------------------
  30. Lawrence Kirby | fred@genesis.demon.co.uk
  31. Wilts, England | 70734.126@compuserve.com
  32. -----------------------------------------
  33.